package com.espirit.eap.sa;

import java.util.Date;

import javax.persistence.Entity;

import org.hibernate.annotations.Index;
import org.hibernate.annotations.Table;

import com.espirit.EntityMapping;
import com.googlecode.cswish.model.Saas;

@Entity
@Table(indexes={
		@Index(name="idx_saas_usersecurity_identity", columnNames={"identity"} ),
		@Index(name="idx_usersecurity_idex_idlogintime", columnNames={"identity", "loginTime"} )
	}, appliesTo = "saas_usersecurity")
public class UserSecurity extends EntityMapping implements Saas {

	private Date loginTime;
	
	private Integer errCount;

	// the check flag, such as use name or ip address
	private String identity;
	
	private Integer sid;
	public Integer getSid() {
		return sid;
	}

	public void setSid(Integer sid) {
		this.sid = sid;
	}
	
	public Date getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

	public Integer getErrCount() {
		return errCount;
	}

	public void setErrCount(Integer errCount) {
		this.errCount = errCount;
	}

	public String getIdentity() {
		return identity;
	}

	public void setIdentity(String identity) {
		this.identity = identity;
	}
	
}
